Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do not add "undefined" to the beginning of the result of .fixMarkup() #1453

Merged
merged 1 commit into from
Feb 18, 2017

Conversation

nknapp
Copy link
Contributor

@nknapp nknapp commented Feb 17, 2017

Fixes #1452

  • Added default return value (empty string) to the ".replace()" call.

@nknapp
Copy link
Contributor Author

nknapp commented Feb 17, 2017

I tried to keep to the existing code style, and I added a test for the fix.

src/highlight.js Outdated
@@ -593,6 +593,7 @@ https://highlightjs.org/
} else if (options.tabReplace) {
return p1.replace(/\t/g, options.tabReplace);
}
return "";
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A tiny nit: could you use single quotes for strings as in the rest of the code? :-)

Fixes highlightjs#1452

- Added default return value (empty string) to the ".replace()" call.
@nknapp
Copy link
Contributor Author

nknapp commented Feb 18, 2017

Oops... That's the thing with german keyboards. Typing " is almost easier than typing '. I always get it confused.

I've changed that and made a force-push to my branch to no pollute history...

@isagalaev isagalaev merged commit 543b8f8 into highlightjs:master Feb 18, 2017
@isagalaev
Copy link
Member

Thanks, merged! (Don't really care about history "pollution" myself :-) )

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants